package com.ruoyi.industry.controller.back;

import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.industry.service.ISpaceIndustryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/spaceIndustry")
public class SpaceIndustryController {

    @Autowired
    private ISpaceIndustryService spaceIndustryService;

    @Log(title = "产业物理空间统计", businessType = BusinessType.OTHER)
    @GetMapping("/statistics")
    public AjaxResult statistics(){
        return AjaxResult.success(spaceIndustryService.statistics());
    }

    /**
     * 数据对比
     * @return 结果
     */
    @GetMapping("/dataComparison")
    public AjaxResult dataComparison(){
        return AjaxResult.success(spaceIndustryService.dataComparison());
    }

    /**
     * 数据总览/用户总览（已发布信息量）
     * @return 结果
     */
    @GetMapping("/dataOverview")
    public AjaxResult dataOverview() {
        return AjaxResult.success(spaceIndustryService.dataOverview());
    }

    /**
     * 区域营商环境：business
     * 产业物理空间：industry
     * 科技产业服务港：service
     * 三大频道 用户发布信息的线上咨询点击量查询
     */
    @GetMapping("/getUserClickRate")
    public AjaxResult getUserClickRate(){
        return AjaxResult.success(spaceIndustryService.getUserClickRate());
    }

    /**
     * 用户角色对应权限的发布信息的产品信息点击量
     */
    @GetMapping("/numberOfClicks")
    public AjaxResult getNumberOfClicks(){
        return AjaxResult.success(spaceIndustryService.getNumberOfClicks());
    }
}
